﻿using System.Web.Http;
using Common;
using IBll;

namespace Controllers.Extend
{
    /// <summary>
    /// 基础WebApi类
    /// </summary>
    public class BaseApiController: ApiController
    {
        public IBllSession CurrentBllSession { get; set; }

        /// <summary>
        /// 此处可省略：使用Autofac.WebApi提供的RegisterApiControllers方法进行Webapi的注册
        /// </summary>
        public BaseApiController()
        {
            CurrentBllSession = IocHelper.AutofacResolve<IBllSession>();
        }

        /// <summary>
        /// HTTP 200 response with empty body
        /// </summary>
        /// <returns></returns>
        public string Options()
        {
            return null; // HTTP 200 response with empty body
        }

    }
}